function getSum(...args:number[]):number {
    let sum:number=0
    for (let i:number = 0; i <args.length; i++) {
        sum+=args[i]
    }
    return  sum
}

console.log(getSum(1,2,3,4,5,6,7,8,9,10))